home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Freeware
/
First Page 2006 3.00
/
fp2006-final-3.00-setup.exe
/
{app}
/
Iscripts
/
Forms Misc
/
auto-month.izs
< prev
next >
Wrap
Text File
|
2005-09-28
|
3KB
|
185 lines
<!NOWIZARD>
<!TITLE>Auto Month
<!/TITLE>
<!DESCRIPTION>This script adjust the list of months in the drop down list so that the current is the one showing first!<!/DESCRIPTION>
<!CATEGORY>Forms<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL AUTO MONTH:
1. Copy code into the body section of document -->
<!-- STEP ONE: Add this code into BODY section of document -->
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Don Demrow (d1102@home.com) -->
<!-- Modified: Benjamin Wright, evrsoft.com Editor -->
<!-- Web Site: http://resume.w3site.com -->
<!-- Begin
var time = new Date();
var month = time.getMonth();
var date = month - 12;
var realJavaScriptMonth = month;
var future = month + 0;
month = month + 1; /* Compensate for "January" being "0" */
document.writeln ("<FORM><SELECT><OPTION value=\"\">Month");
do {
month = date;
if (month >= 12) {
month = month - 12;
}
if (month < 0) {
month = month + 12;
}
date++;
var dateName ="";
switch (month) {
case 0:
dateName = "January";
break;
case 1:
dateName = "February";
break;
case 2:
dateName = "March";
break;
case 3:
dateName = "April";
break;
case 4:
dateName = "May";
break;
case 5:
dateName = "June";
break;
case 6:
dateName = "July";
break;
case 7:
dateName = "August";
break;
case 8:
dateName = "September";
break;
case 9:
dateName = "October";
break;
case 10:
dateName = "November";
break;
case 11:
dateName = "December";
break
}
month++;
realJavaScriptMonth++;
document.write ("<OPTION value=\"" + realJavaScriptMonth + "\">" + dateName + "");
realJavaScriptMonth++;
}
while (date < future)
document.write ("</SELECT></FORM>");
// End -->
</script>
<!-- END OF SCRIPT -->
<!/SCRIPT>
<!PREVIEW>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL AUTO MONTH:
1. Copy code into the body section of document -->
<!-- STEP ONE: Add this code into BODY section of document -->
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Don Demrow (d1102@home.com) -->
<!-- Modified: Benjamin Wright, evrsoft.com Editor -->
<!-- Web Site: http://resume.w3site.com -->
<!-- Begin
var time = new Date();
var month = time.getMonth();
var date = month - 12;
var realJavaScriptMonth = month;
var future = month + 0;
month = month + 1; /* Compensate for "January" being "0" */
document.writeln ("<FORM><SELECT><OPTION value=\"\">Month");
do {
month = date;
if (month >= 12) {
month = month - 12;
}
if (month < 0) {
month = month + 12;
}
date++;
var dateName ="";
switch (month) {
case 0:
dateName = "January";
break;
case 1:
dateName = "February";
break;
case 2:
dateName = "March";
break;
case 3:
dateName = "April";
break;
case 4:
dateName = "May";
break;
case 5:
dateName = "June";
break;
case 6:
dateName = "July";
break;
case 7:
dateName = "August";
break;
case 8:
dateName = "September";
break;
case 9:
dateName = "October";
break;
case 10:
dateName = "November";
break;
case 11:
dateName = "December";
break
}
month++;
realJavaScriptMonth++;
document.write ("<OPTION value=\"" + realJavaScriptMonth + "\">" + dateName + "");
realJavaScriptMonth++;
}
while (date < future)
document.write ("</SELECT></FORM>");
// End -->
</script>
<!-- END OF SCRIPT -->
<!/PREVIEW>
<!RELATED>NONE<!/RELATED>